package com.maning.imagebrowserlibrary.model;

import android.os.Parcel;
import android.os.Parcelable;

public class ImageDetailBean implements Parcelable {
    private final String images;
    private final int locationX;
    private final int locationY;
    private final int selfWidth;
    private final int selfHeight;


    protected ImageDetailBean(Parcel in) {
        images = in.readString();
        locationX = in.readInt();
        locationY = in.readInt();
        selfWidth = in.readInt();
        selfHeight = in.readInt();
    }

    public ImageDetailBean(String images, int locationX, int locationY, int selfWidth, int selfHeight) {
        this.images = images;
        this.locationX = locationX;
        this.locationY = locationY;
        this.selfWidth = selfWidth;
        this.selfHeight = selfHeight;
    }

    public String getImages() {
        return images;
    }

    public int getLocationX() {
        return locationX;
    }

    public int getLocationY() {
        return locationY;
    }

    public int getSelfWidth() {
        return selfWidth;
    }

    public int getSelfHeight() {
        return selfHeight;
    }

    public static final Creator<ImageDetailBean> CREATOR = new Creator<ImageDetailBean>() {
        @Override
        public ImageDetailBean createFromParcel(Parcel in) {
            return new ImageDetailBean(in);
        }

        @Override
        public ImageDetailBean[] newArray(int size) {
            return new ImageDetailBean[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(images);
        dest.writeInt(locationX);
        dest.writeInt(locationY);
        dest.writeInt(selfWidth);
        dest.writeInt(selfHeight);
    }
}